<div class="header">
    <div class="header-wrap">
        <h1 class="logo pull-left">
<!--            <a href="#">-->
<!--                <img src="/static/images/logo.png" onclick="home()" alt="" class="logo-img">-->
                <img src="/static/images/logo-text.png" onclick="show()" alt="" class="logo-img">
<!--            </a>-->
        </h1>
        <h1  id="hidden-search" style="position: absolute;text-align: center;width:160px;display: none;margin: 10px 0 0 140px">
            <input type="text" id="hidden-box" class="layui-input"/>
        </h1>
        <form class="layui-form blog-seach pull-left"
              action="{{"/"}}">
            <div class="layui-form-item blog-sewrap">
                <div class="layui-input-block blog-sebox">
<!--                    <i class="layui-icon layui-icon-search"></i>-->
                    <input type="text" name="title" lay-verify="title" autocomplete="off" value="{{.title}}"
                           class="layui-input">
                </div>
            </div>
        </form>
        <div class="blog-nav pull-right">
            <ul class="layui-nav pull-left">
                <li class="layui-nav-item {{if equrl "/" .Path }}layui-this{{end}}"><a href="/">首页</a></li>
                <li class="layui-nav-item {{if equrl "/type" .Path }}layui-this{{end}}"><a href="/?page=1&title=&type=review">分类</a></li>
                <li class="layui-nav-item {{if equrl "/message" .Path }}layui-this{{end}}">
                    <a href="/message">留言</a>
                </li>
<!--                <li class="layui-nav-item">-->
<!--                    <a href="https://github.com/Milo233/go-blog" target="_blank">Github</a>-->
<!--                </li>-->
            </ul>
        {{/*{{if .IsLogin}} # {{else}} /user {{end}}*/}}
            <a href="/user" style="color:#fff;max-width: 120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap" class="personal pull-left">
                <span><i id="userName" style="color: #fff;" class="layui-icon {{if .IsLogin}}  {{else}} layui-icon-username {{end}} ">{{.User.Name}}</i></span>

            </a>
        </div>
        <div class="mobile-nav pull-right" id="mobile-nav">
            <a href="javascript:;">
                <i class="layui-icon layui-icon-more"></i>
            </a>
        </div>
    </div>
    <ul class="pop-nav" id="pop-nav">
        <li><a href="/">首页</a></li>
        <li><a href="/?page=1&title=&type=review">分类</a></li>
        <li><a href="/message">留言</a></li>
    {{/*<li><a href="/about">关于</a></li>*/}}
        <li>
            <a href="/user">
                <i class="layui-icon {{if .IsLogin}}  {{else}} layui-icon-username {{end}} "
                                   style="font-size: 20px;font-style: normal;font-weight:bold;">
                {{if .User.Name}}{{.User.Name}}{{else}}登陆{{end}}
                </i>
            </a>
        </li>
    </ul>
</div>
<script type="text/javascript" src="/static/js/jquery.min.js"></script>
<script>
    function home(){
	 window.location.href = ("/")	
    }

    function show() {
        if ($("#hidden-search").css("display")==="block") {
            $("#hidden-search").css('display','none');
        } else {
            $("#hidden-search").css('display','block');
        }
    }
    $('#hidden-box').keydown(function(e){
        if(e.keyCode===13){
            window.location.href = ("/?title=" + $('#hidden-box').val())
        }
    });
</script>
